const arr = [1,[2,[4,[6,[8,[10],11],9],7],5],3]

// 1.长度
arr.length
//2.末尾添加元素
arr.push({})
//3指定位置添加
arr.splice(start = 0,index = 0,[{},{}])
//4.头部添加
arr.unshift({})
//5.头部删除
arr.shift()
//6.尾部删除
arr.pop()
//7.指定范围位置删除
arr.slice(start = 0,end = 3)
//8.指定位置删除
arr.splice(start,1)

//9.搜索
arr.indexOf()
arr.lastIndexOf()
arr.includes(searchElement,fromIndex)

//10合并
arr.concat()

//11转string
arr.toLocaleString() //数组为对象：[object Object] 数组为文字或者数字："0,1,1,3"
arr.toString() //数组为对象：[object Object] 数组为文字或者数字："0,1,1,3"

//12数组排序
arr.sort((a,b) => a - b)

//13数组翻转
arr.reverse()

//14数组转字符串
arr.join("")

//15数组循环
for (let i = 0,len = arr.length; i < len; i++) {

}

for (const arrKey in arr) {

}

for (const arrElement of arr) {

}

arr.forEach((item,index,array) => {
    console.log(`item:${item} ==== index:${index} ===== array:${array}`)
})

arr.map((item,index,array) => {
    console.log(`item:${item} ==== index:${index} ===== array:${array}`)
})

//16数组过滤
arr.filter((item,index,array) => {
    console.log(`item:${item} ==== index:${index} ===== array:${array}`)
})

//17数组元素填充
arr.fill(value, start, end)

//18类数组对象转数组
const list = document.querySelector(".list")
const Obj = list.querySelectorAll(".item")
const array = Array.from(Obj)

//19 数组降维
const newArr = [1,[2,[4,[6,[8,[10],11],9],7],5],3]
const resultArr = newArr.flat()

//20数组高阶函数
arr.some((value, index, array = [])=>{

})
arr.every((value, index, array = [])=>{

})

arr.reduce((previousValue, currentValue, currentIndex, array)=>{})

